package cn.trdu._07springaop.aop;

import org.springframework.stereotype.Component;


@Component
public class CalculatorImpl implements Calculator {
    @Override
    public int add(int m, int n) {
        int result = m + n;
        System.out.println("方法内部:" + result);
        return result;
    }

    @Override
    public int sub(int m, int n) {
        int result = m - n;
        System.out.println("方法内部:" + result);
        return result;
    }

    @Override
    public int mul(int m, int n) {
        int result = m * n;
        System.out.println("方法内部:" + result);
        return result;
    }

    @Override
    public int div(int m, int n) {
        int result = m / n;
        System.out.println("方法内部:" + result);
        return result;
    }

}
